package com.yuexun.dhdoctor.module.meetingNew.api;

import com.yuexun.dhdoctor.base.BaseEntity;
import com.yuexun.dhdoctor.base.bean.model.HelpFileEntity;
import com.yuexun.dhdoctor.module.meetingNew.bean.MeetingNewCheckStateBean;
import com.yuexun.dhdoctor.module.meetingNew.bean.MeetingNewDateBean;
import com.yuexun.dhdoctor.module.meetingNew.bean.MeetingNewDetailBean;
import com.yuexun.dhdoctor.module.meetingNew.bean.MeetingNewQrCodeBean;
import com.yuexun.dhdoctor.module.meetingNew.bean.MeetingNewRoleBean;
import com.yuexun.dhdoctor.module.meetingNew.bean.MeetingNewRoomBean;
import com.yuexun.dhdoctor.module.meetingNew.bean.MeetingNewRoomBeanNew;
import com.yuexun.dhdoctor.module.meetingNew.bean.MeetingNewSignBean;
import com.yuexun.dhdoctor.module.meetingNew.bean.MeetingNewTypeBean;
import com.yuexun.dhdoctor.module.meetingNew.bean.MeetingRoomBean;

import java.util.Map;

import retrofit.http.FieldMap;
import retrofit.http.FormUrlEncoded;
import retrofit.http.POST;
import retrofit.http.Query;
import rx.Observable;

/**
 * Created by work-jx on 2016/11/15.
 */
public interface MeetingNewApi {
    //会议信息列表
    @FormUrlEncoded
    @POST("inquireMeetingListWeekly.json")
    Observable<BaseEntity<MeetingNewDateBean>> getMeetingList(@FieldMap Map<String, String> praise);

    //会议详情
    @FormUrlEncoded
    @POST("inquireMeetingDetail.json")
    Observable<BaseEntity<MeetingNewDetailBean>> getMeetingDetail(@FieldMap Map<String, String> praise);

    //查询会议签到
    @FormUrlEncoded
    @POST("inquireAccountSignState.json")
    Observable<BaseEntity<MeetingNewCheckStateBean>> getMeetingCheckState(@FieldMap Map<String, String> praise);

    //会议签到
    @FormUrlEncoded
    @POST("createMeetingAttendance.json")
    Observable<BaseEntity<String>> getMeetingCheck(@FieldMap Map<String, String> praise);

    //会议签到记录
    @FormUrlEncoded
    @POST("inquireUserMeetingSignDetail.json")
    Observable<BaseEntity<MeetingNewSignBean>> getMeetingSign(@FieldMap Map<String, String> praise);


    //会议可见性列表
    @FormUrlEncoded
    @POST("inquireRoleList.json")
    Observable<BaseEntity<MeetingNewRoleBean>> getRoleList(@FieldMap Map<String, String> praise);

    //发起会议
    @FormUrlEncoded
    @POST("createMeeting.json")
    Observable<BaseEntity<String>> createMeeting(@Query("participantIds") String[] participantIds,
                                                 @Query("readyIds") String[] readyIds,
                                                 @Query("deptIdList") String[] deptIdList,
                                                 @Query("deptSignCountList") String[] deptSignCountList,
                                                 @Query("groupIdList") String[] groupIdList,
                                                 @Query("groupSignCountList") String[] groupSignCountList,
                                                 @FieldMap Map<String, String> praise);


    //修改会议
    @FormUrlEncoded
    @POST("updateMeeting.json")
    Observable<BaseEntity<String>> updateMeeting(@Query("participantIds") String[] participantIds,
                                                 @Query("readyIds") String[] readyIds,
                                                 @Query("deptIdList") String[] deptIdList,
                                                 @Query("deptSignCountList") String[] deptSignCountList,
                                                 @FieldMap Map<String, String> praise);

    //更新会议状态
    @FormUrlEncoded
    @POST("updateMeetingFalg.json")
    Observable<BaseEntity<String>> updateStatus(@FieldMap Map<String, String> praise);

    //会议室状态列表
    @FormUrlEncoded
    @POST("inquireMeetingRoomCalendar.json")
    Observable<BaseEntity<String>> getRoomStateList(@FieldMap Map<String, String> praise);

    //（可用）会议地点列表
    @FormUrlEncoded
    @POST("inquireUsableMeetingRoomList.json")
    Observable<BaseEntity<MeetingNewRoomBean>> getRoomList(@FieldMap Map<String, String> praise);

    //（可用）会议地点列表
    @FormUrlEncoded
    @POST("inquireMeetingRoomTypeList.json")
    Observable<BaseEntity<MeetingNewRoomBeanNew>> getRoomList2(@FieldMap Map<String, String> praise);

    //（全部）会议地点列表
    @FormUrlEncoded
    @POST("inquireMeetingRoomList.json")
    Observable<BaseEntity<MeetingNewRoomBean>> getAllRoomList(@FieldMap Map<String, String> praise);

    //判断会议人员是否冲突
    @FormUrlEncoded
    @POST("judgeMeetingMember.json")
    Observable<BaseEntity<String>> getJudgeMember(@Query("participantIds") String[] participantIds,
                                                  @FieldMap Map<String, String> praise);

    /**
     * 动态二维码
     **/

    //请求动态二维码
    @FormUrlEncoded
    @POST("meetingQrCodeUpdate.json")
    Observable<BaseEntity<MeetingNewQrCodeBean>> getQrCode(@FieldMap Map<String, String> praise);

    //动态二维码签到
    @FormUrlEncoded
    @POST("createMeetingAttendanceByQrCode.json")
    Observable<BaseEntity<String>> checkMeetingByQrCode(@FieldMap Map<String, String> praise);


    /**
     * 会议类型
     */
    //类型列表
    @FormUrlEncoded
    @POST("inquireMeetingConfigList.json")
    Observable<BaseEntity<MeetingNewTypeBean>> getTypeList(@FieldMap Map<String, String> praise);

    //类型详情
    @FormUrlEncoded
    @POST("loadMeetingConfig.json?")
    Observable<BaseEntity<HelpFileEntity>> getTypeDetail(@FieldMap Map<String, String> praise);


    //类型详情
    @FormUrlEncoded
    @POST("inquireMeetingRoomDuringDetail.json?")
    Observable<BaseEntity<MeetingRoomBean>> getMeetRoomDetail(@FieldMap Map<String, String> praise);

    //未读会议列表
    @FormUrlEncoded
    @POST("inquireUnreadMeetingPageList.json?")
    Observable<BaseEntity<MeetingNewDateBean>> getMeetingUnReadList(@FieldMap Map<String, String> praise);


    //创建缺勤
    @FormUrlEncoded
    @POST("createMeetingAbsence.json?")
    Observable<BaseEntity<String>> createMeetingAbsence(@FieldMap Map<String, String> praise);

    //更新缺勤
    @FormUrlEncoded
    @POST("updateMeetingAbsence.json?")
    Observable<BaseEntity<String>> updateMeetingAbsence(@FieldMap Map<String, String> praise);
}
